<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>支付宝绑定-购物兔</title>
<script language="javascript" src="../js/common.js"></script>
<script language="javascript" src="../js/jquery.min.js"></script>
<script language="javascript">
var bShowEmail = false;
var g_opt = "";
var g_check = "";
var g_bshowRecommend = false;
var g_code = "";

function OnRegister()
{
	var alipay = document.getElementById("alipay_id").value;
	var commend = document.getElementById("commend_id").value;
	var phone = document.getElementById("phone_id").value;
	var opt = document.getElementById("opt_id").value;
	
	if( alipay == "请输入您的支付宝帐号" || alipay == "" )
	{
		alert( "请输入您的支付宝帐号。\r\n返现的金额将转账至此账号中，请确保正确，否则将收不到返现金额。" );
		document.getElementById("alipay_id").focus();
		return;
	}
	else
	{
		if( (!isemail( alipay )) && (!isphone( alipay )) )
		{
			alert( "您输入的支付宝帐号格式不对哦，请确认是支付宝账号，您可能输入的是淘宝账号。" );
			document.getElementById("alipay_id").focus();
			return;
		}
	}
	
	//开启检测推荐id check=0 不开启检测
	if( g_bshowRecommend == true && g_check != "0" && commend != "请输入邀请码" && commend != "")
	{
//		if( commend == "请输入邀请码" || commend == "" )
//		{
//			alert( "要使用购物兔，需要邀请码哦\r\n\r\n如果您没有邀请码，可以找使用过购物兔的朋友要\r\n\r\n或者，加入我们Q群25276471申请。" );
//			document.getElementById("commend_id").focus();
//			return;
//		}

		var url = "../checkcommend.php?commend=" + commend;
		var html = $.ajax({	url: url,
						  	async: false
						 }).responseText;
		
		if( html.indexOf("1") == -1 )
		{
			alert("您输入的邀请码有误哦!\r\n\r\n如果您没有邀请码，可以找使用过购物兔的朋友要\r\n\r\n或者，以后再输入，有疑问请联系我们客服。" );
			document.getElementById("commend_id").focus();
			return;
		}
	}
	
	if( bShowEmail )
	{
		if( phone == "请输入您的电子邮箱" || phone == "" )
		{
			if(!confirm( "确定不输入电子邮箱吗？\r\n\r\n请点击“取消”，重新输入电子邮箱。" ) )
			{
				document.getElementById("phone_id").focus();
				return;
			}
			
			document.getElementById("phone_id").value = "";
			phone = "";
		}
		else if( !isemail( phone ) )
		{
			alert( "您输入的电子邮箱有误。" );
			document.getElementById("phone_id").focus();
			return;
		}
	}
	else
	{
		if( phone == "请输入您的手机号码" || phone == "" )
		{
//			if(!confirm( "确定不输入手机号码吗？当返现时，淘宝官方会发送免费短信通知您，\r\n如果不填写，将收不到短信通知哦。\r\n\r\n请点击"取消"，重新输入手机号码。" ) )
			alert( "必须输入手机号码，当返现时，淘宝官方会发送免费短信通知您。" );
			{
				document.getElementById("phone_id").focus();
				return;
			}
			
			document.getElementById("phone_id").value = "";
			phone = "";
		}
		else if( !isphone( phone ) )
		{
			alert( "您输入的手机号码有误。\r\n\r\n当返现时，淘宝官方会发送免费短信通知您，\r\n如果手机号码有误，将收不到短信通知哦。" );
			document.getElementById("phone_id").focus();
			return;
		}
	}
	
	if( commend == "请输入邀请码" )
	{
		document.getElementById("commend_id").value = "";
		commend = "";
	}
		
	document.getElementById("RegId").submit();
}

function ShowOneLayer( tipId, bShow )
{
	if( bShow )
	{
		document.getElementById(tipId).style.visibility = "";		
	}
	else
	{
		document.getElementById(tipId).style.visibility = "hidden";	
	}
}
function OnMouseUp( obj )
{
	var value = obj.value;
	var id = obj.id;
	
	if( id == "alipay_id" )
	{
		if( value =="请输入您的支付宝帐号" )
		{
			obj.value = "";
			obj.style.color = "#000000";
		}
		
		//ShowOneLayer( "tb_tip", true );
	}
	else if( id == "commend_id" )
	{
		if( value =="请输入邀请码" )
		{
			obj.value = "";
			obj.style.color = "#000000";
		}
	
//		ShowOneLayer( "commend_tip", true );
	}
	else if( id == "phone_id" )
	{
		if( value =="请输入您的手机号码" )
		{
			obj.value = "";
			obj.style.color = "#000000";
		}
		
		//ShowOneLayer( "phone_tip", true );
	}
	else if( id == "email_id" )
	{
		if( value =="请输入您的电子邮箱" )
		{
			obj.value = "";
			obj.style.color = "#000000";
		}
		
		//ShowOneLayer( "email_tip", true );
	}
}

function OnMouseOutAlipay( obj )
{
	var alipay = document.getElementById("alipay_id").value;
	bShowEmail = isphone( alipay );
	if( bShowEmail )
	{
		document.getElementById("phone_or_email_text").innerHTML = "电子邮箱";
		if( document.getElementById( "phone_id" ).value == "" || document.getElementById( "phone_id" ).value == "请输入您的手机号码" )
			document.getElementById( "phone_id" ).value = "请输入您的电子邮箱";
		document.getElementById("use_phone_id").value = "0";	
	}
	else
	{
		document.getElementById("phone_or_email_text").innerHTML = "手机号码";
		if( document.getElementById( "phone_id" ).value == "" || document.getElementById( "phone_id" ).value == "请输入您的电子邮箱" )
			document.getElementById( "phone_id" ).value = "请输入您的手机号码";
		document.getElementById("use_phone_id").value = "1";
	}
	
	if( obj.value == "" )
	{
		obj.value = "请输入您的支付宝帐号";
		obj.style.color = "#CCCCCC";
	}
	
	//ShowOneLayer( "tb_tip", false );
	
	if( alipay != "" && alipay != "请输入您的支付宝帐号" )
	{
		var url = "http://www.gouwutu.com/checkuser.php?tb_id=" + alipay;
		var html = $.ajax({	url: url,
							async: false
						 }).responseText;
		
		//不需要检测
		if( html.indexOf("1") != -1 /*|| g_opt == "change" || g_opt == "getcommendurl"  || g_check == "0"*/ || g_code)
			ShowRecommend( false );
		else
			ShowRecommend( true );
	}
}

function OnMouseUpEx( obj )
{
	if( bShowEmail )
	{
		if( obj.value =="请输入您的电子邮箱" )
		{
			obj.value = "";
			obj.style.color = "#000000";
		}
	}
	else
	{
		if( obj.value =="请输入您的手机号码" )
		{
			obj.value = "";
			obj.style.color = "#000000";
		}
	}
}

function OnMouseOutEx( obj )
{
	if( bShowEmail )
	{
		if( obj.value =="" )
		{
			obj.value = "请输入您的电子邮箱";
			obj.style.color = "#CCCCCC";
		}
	}
	else
	{
		if( obj.value =="" )
		{
			obj.value = "请输入您的手机号码";
			obj.style.color = "#CCCCCC";
		}
	}
}

function OnMouseOut( obj )
{
	var value = obj.value;
	var id = obj.id;
	
	if( id == "alipay_id" )
	{
		if( value =="" )
		{
			obj.value = "请输入您的支付宝帐号";
			obj.style.color = "#CCCCCC";
		}
	}
	else if( id == "commend_id" )
	{
		if( value =="" )
		{
			obj.value = "请输入邀请码";
			obj.style.color = "#CCCCCC";
		}
	}
	else if( id == "phone_id" )
	{
		if( value =="" )
		{
			obj.value = "请输入您的手机号码";
			obj.style.color = "#CCCCCC";
		}		
	}
	else if( id == "email_id" )
	{
		if( value =="" )
		{
			obj.value = "请输入您的电子邮箱";
			obj.style.color = "#CCCCCC";
		}
	}
}

function OnBodyLoad()
{
	ShowRegisterResult();
	if (g_opt != "change")
	{
		g_code = GetUrlParam("code=");
		if (g_code == "")
			g_code = getCookie("recommend_code");
	}

	if (g_code)
	{
		document.getElementById( "commend_id" ).value = g_code;
		document.getElementById( "commend_id" ).style.visibility = "hidden";
		if (g_code == "ICBC95588")
			document.getElementById( "commend_f_id" ).innerHTML = "您是工行集团用户";
		else
			document.getElementById( "commend_f_id" ).innerHTML = "您是朋友推荐用户";;
	}
	
	document.getElementById("RegId").action = "http://www.gouwutu.com/bangding.php?ref=" + GetUrlParam("ref=");
}

function ShowRecommend( bShow )
{
	if( bShow )
	{
		document.getElementById( "commend_text_id" ).style.visibility = "";
		if (document.getElementById("commend_id").value == "" || document.getElementById("commend_id").value == "请输入邀请码")
			//document.getElementById( "commend_tip_id" ).style.visibility = "";
		document.getElementById( "commend_id" ).style.visibility = "";
	}
	else
	{
		document.getElementById( "commend_text_id" ).style.visibility = "hidden";
		//document.getElementById( "commend_tip_id" ).style.visibility = "hidden";
		document.getElementById( "commend_id" ).style.visibility = "hidden";
	}
	
	g_bshowRecommend = bShow;
}
	
function ShowRegisterResult()
{
	
	//alert( window.location );
	var hr = GetUrlParam("hr=");
	var userid=GetUrlParam("userid=");
	g_opt = GetUrlParam("opt=");			// 去掉这个条件
	g_check = GetUrlParam("check=");
	
//	if( g_opt == "change" )
//		document.getElementById( "opt_id" ).value = "1";
//	if( g_opt == "getcommendurl" )
//		document.getElementById( "opt_id" ).value = "3";
	
	ShowRecommend( false );
	
	if( hr != "")
	{
		var strResult = "";
		switch( hr )
		{
			case "1":
				window.location.href="http://www.gouwutu.com";
			break;
			
			default:
				strResult = "该支付宝帐号已经被占用。";
				alert( strResult );
				document.getElementById("alipay_id").focus();
			break;
		}
	} 
}
// JavaScript Document
//自动检验cookie的值！如果Cookie的值为gouwutu&&gouwubidu则自动跳转页面，
function autoJump()
{
	var tmp =readCookie("cookieNamebangding");
	if(tmp=="gouwutu&&gouwutubangding")
	{
		//document.getElementById("mustSee").style.display="none";
		document.getElementById("mustSee").parentNode.removeChild(document.getElementById("mustSee"));
	}else{
		document.getElementById("mustSee").style.display="block";
		document.getElementById("zhez").style.display="block";
	}
}
//读取Cookie的值得方法！
function readCookie(name)
{
	var cookieValue = "";
	var search = name + "=";
	if(document.cookie.length > 0)
	{
		offset = document.cookie.indexOf(search);
		if(offset != -1)
		{
			offset += search.length;
			end = document.cookie.indexOf(";",offset);
			if (end == -1) end = document.cookie.length;
			cookieValue = unescape(document.cookie.substring(offset, end))
		}
	}
	return cookieValue;
}
//添加cookie
function addCookie(objName,objValue,objHours)
{
	var str = objName + "=" + escape(objValue);
	if(objHours > 0)
	{//为0时不设定过期时间，浏览器关闭时cookie自动消失
		var date = new Date();
		var ms = objHours*3600*1000;
		date.setTime(date.getTime() + ms);
		str += ";expires=" + date.toGMTString()+";path="+"/"+";";
	}
    document.cookie = str;
    //alert("添加cookie成功");
}
function subm()
{
	addCookie("cookieNamebangding","gouwutu&&gouwutubangding","201112211204");
	document.getElementById("mustSee").style.display="none";
	document.getElementById("zhez").style.display="none";
}
</script>
<style type="text/css">
body, div, dl, dt, dd, ul, ol, li, p, h1, h2, h3, h4, h5, h6, form, fieldset, legend, input, textarea, blockquote, th, td{margin: 0;padding: 0;}
body { background:#f0f0f0;font-size:12px; color:#333; line-height:150%;}
img{border:0 none; vertical-align:top;}
input, textarea, select, button{padding: 1px;font-size: 12px;}
ol, ul{list-style: none;}
h1, h2, h3, h4, h5, h6{font-size: 1em;font-style: normal;line-height: 1.5em; font-weight:normal;}
a{color:#850303; -moz-transition:none;}
a:hover{color:#E75718}
/******/
#container { width:950px; margin:0 auto;}
.bd { background:url(images/bangding/bg.jpg) no-repeat; width:950px; height:385px; overflow:hidden;}
.r { width:430px; height:370px;margin-left:500px; overflow:hidden;}
.s1 { margin-top:45px; margin-left:222px;}
.s2 { margin-top:23px; position:relative;}
.s3 { width:353px; height:93px; margin-left:45px; margin-top:19px;}
.s3 a { line-height:40px; margin:0 17px;}
.input_border { width:200px; border:0; background:#FFF; height:20px; line-height:20px; padding:4px; color:#ccc;}
#lh{margin:16px 0 10px;word-spacing:3px}
#lh a,.Bound a { color:#E75718;}
#cp, #cp a { color:#F3AA8B;}
/***/
/***返现必看***/
#mustSee {width:567px; height:369px; position:absolute; z-index:99999; background:url(images/bangding/fanxianyuanli.gif) no-repeat; left:27%; top:130px; display:none;}
#mustSee .btn { background:url(images/bangding/yuanli_btn.gif) no-repeat; width:209px; height:57px; border:0; padding:0; cursor:pointer;}
#zhez {background-color:#000000;height:100%; *height:2000px;left:0;filter:alpha(opacity=70);opacity:0.7;overflow:hidden;position:absolute;top:0;width:100%;z-index:900; display:none;}
</style>
</head>
<body onload="javascript:OnBodyLoad();autoJump();" scroll="no">
<div id="zhez"></div>
<div id="mustSee">
	<p style=" height:280px; width:567px;"></p>
    <p style="text-align:center;"><input onclick="subm();"  class="btn" type="button" value="" name="Submit">&nbsp;&nbsp;<a style="color:red;" href="http://www.gouwutu.com/faq.html" title="我还想了解更多">我还想了解更多</a></p>
</div>

<div id="container">
	<div class="main">
    	<div style="width:950px;"><img src="images/bangding/top.jpg" width="946" height="121" /></div>
        <div class="bd">
        	<div class="r">
            	<div class="s1"><a href="http://blog.gouwutu.com/?p=173" target="_blank"><span style="color:#F00; font-weight:400; font-size:16px">*</span>没有支付宝怎么办？</a></div>
                <div class="s2">
                	<form action="http://www.gouwutu.com/bangding.php" method="post" id="RegId">
                    	<table cellpadding="0" cellspacing="0" border="0" align="center" width="100%">
                        	<tr>
                            	<td width="99" height="35" align="right" ><font size="3">支付宝账号：</font></td>
                              <td width="331" align="left" height="35"><input type="text" name="alipay_id" id="alipay_id" class="input_border" value="请输入您的支付宝帐号" title="正确的支付宝帐号，才能获取返回现金" onfocus="javascript:OnMouseUp( this );" onblur="javascript:OnMouseOutAlipay(this);" tabindex="1">&nbsp;如：邮箱或手机</td>
                          </tr>
                            <tr>
                            	<td width="99" height="35" align="right"><font size="3"><span id="phone_or_email_text">手机号码</span>：</font></td>
                       		  <td align="left"><input type="text" name="phone_id" id="phone_id" class="input_border" value="请输入您的手机号码" onfocus="javascript:OnMouseUpEx( this );" onblur="javascript:OnMouseOutEx(this);" tabindex="2"/><input type="hidden" value="1" id="use_phone_id" name="use_phone"/></td>
                         	</tr>
                            <tr>
                            	<td width="99" height="35" align="right"><input name="opt" type="hidden" id="opt_id" value="0" /><span id="commend_text_id" style="visibility:hidden;"><font size="3">邀请码：</font></span></td>
                              <td align="left"><input type="text" name="commend_id" id="commend_id" class="input_border" value="请输入邀请码" onfocus="javascript:OnMouseUp( this );" onblur="javascript:OnMouseOut(this);" tabindex="3" style="visibility:hidden; width:100px;" />
                                <span id="commend_f_id" style="color:#666" title="朋友推荐购物优惠更多">&nbsp;</span></td>
                          	</tr>
                            <tr height="15">
                            	<td colspan="2"></td>
                            </tr>
                            <tr>
                            	<td align="center" height="34" colspan="2"><img src="images/bangding/btn.gif" width="165" height="46" style="cursor:pointer;" onclick="javascript:OnRegister();" id="submit_id"/></td>
                          	</tr>
                        </table>	
                    </form>
                </div>
                <div class="s3">
                	<p><a href="http://www.gouwutu.com/faq.html#n1-3" target="_blank">了解安全问题</a><a href="http://www.gouwutu.com/faq.html" target="_blank">为什么能省钱？</a><a href="http://www.gouwutu.com/faq/help_faq2_01.html" target="_blank">购物兔操作指南</a></p>
                    <p style="text-indent:20px; padding:0 10px; color:#9d625e;">购物成功后，<font size="2" color="#FF0000"><b>返现金额</b></font>将在<font size="2" color="#FF0000"><b>24小时</b></font>内自动转入所绑定的支付宝中，并有淘宝官方免费短信通知您！</p>
                </div>
            </div>
        </div>
    </div>
    <div style="overflow: hidden; width: 950px; margin:0 auto; padding:20px 0; text-align: center; color:#E75718;">
	<p id="lh"><a target="_blank" href="http://www.gouwutu.com/new/doc/coop">下载购物兔</a> | <a target="_blank" href="http://www.gouwutu.com/union">加入购物兔联盟</a> | <a target="_blank" href="http://www.gouwutu.com/faq/help_faq1_01.html#n1-1">新手指导</a> | <a target="_blank" href="http://www.tusijie.com">兔丝街</a> | <a target="_blank" href="http://www.gouwutu.com/aboutus.html">关于购物兔</a></p>
    <p id="cp"> Copyright &copy;2008-2011  购物兔返利网  版权所有   <a href="http://www.miibeian.gov.cn" target="_blank">粤ICP备11009208号</a> </p>
</div>
</div>
</body>
</html>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-20984072-1");
pageTracker._trackPageview();
} catch(err) {}</script>

<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F7eb75a7b189f4a709dead85bc20eb0dd' type='text/javascript'%3E%3C/script%3E"));
</script>